package com.bit.BlogTest.Repository;

import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.stereotype.Repository;

import com.bit.BlogTest.Model.Blog;

@Repository
public class BlogRepositoryImpl extends SqlSessionDaoSupport implements
		BlogRepository {
	

	public List<Blog> findAllContents() {
		SqlSession session = getSqlSession();
		
		List<Blog> lists = session.selectList("selectBlogList");
		return lists;
	}

	public Blog findContentById(int id) {
		return null;
	}

	public boolean insertContent(Blog blog) {
		SqlSession session = getSqlSession();
		
		session.update("insertBlog", blog);
		return false;
	}

}
